# Create your views here.
from django.shortcuts import render_to_response, get_object_or_404
from shop.models import Category
from django.template.context import RequestContext
from django.http import Http404

def index(request):
    return render_to_response('shop/index.html',
                              {}, context_instance = RequestContext(request))

def browse(request, category):
    current_category = get_object_or_404(Category, pk=category)
    return render_to_response('shop/index.html',
                              {'current_category': current_category}, context_instance = RequestContext(request))